import request from '@/utils/request';

// 调整任务
// 列表接口
export async function areaDataList(params) {
  return request(`/esApi/suppBusiScope/getRespAreaList`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function getAdjAccoData(params) {
  return request(`/osApi/annualAdj/pagelistAdjAccoInfo`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function getAdjDetailData(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/get`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 运行保存
export async function insertDataOs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/save`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
// 自主供应商商保存
export async function insertDataNs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/independentSupp/save`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function updataData(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/update`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function updataDataNs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/update`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

// 客服运行详情
export async function getBaseInfoListOs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/get`, {
    method: 'POST',
    body: params,
  });
}
// 自主供应商详情
export async function getBaseInfoListNs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/independentSupp/getSuppBaseInfo`, {
    method: 'POST',
    body: params,
  });
}
// 自主供应商修改详情
export async function getInsBaseInfoListNs(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/get`, {
    method: 'POST',
    body: params,
  });
}

// 接单详情
export async function getReceiveBaseInfoList(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/independentSupp/getSuppBaseInfo`, {
    method: 'POST',
    body: params,
  });
}
// 发单详情
export async function getSendBaseInfoList(params) {
  return request(`/osApi/annualAdj/annualAdjMainTsk/send/getSuppBaseInfo`, {
    method: 'POST',
    body: params,
  });
}

// 客服运行-客户
export async function getCustOs(params) {
  return request(`/osApi/annualAdj/custInfo/page`, {
    method: 'POST',
    body: params,
  });
}
// 自主供应商-客户
export async function getCustNs(params) {
  return request(`/osApi/annualAdj/custInfo/independentSupp/page`, {
    method: 'POST',
    body: params,
  });
}
// 接单-客户
export async function getCustReceive(params) {
  return request(`/osApi/annualAdj/custInfo/independentSupp/page`, {
    method: 'POST',
    body: params,
  });
}
// 发单-客户
export async function getCustSend(params) {
  return request(`/osApi/annualAdj/custInfo/send/page`, {
    method: 'POST',
    body: params,
  });
}

// 客服运行-员工
export async function getEmpOs(params) {
  return request(`/osApi/annualAdj/empInfo/page`, {
    method: 'POST',
    body: params,
  });
}
// 自主供应商-员工
export async function getEmpNs(params) {
  return request(`/osApi/annualAdj/empInfo/independentSupp/page`, {
    method: 'POST',
    body: params,
  });
}
// 接单-员工
export async function getEmpReceive(params) {
  return request(`/osApi/annualAdj/empInfo/independentSupp/page`, {
    method: 'POST',
    body: params,
  });
}
// 发单-员工
export async function getEmpSend(params) {
  return request(`/osApi/annualAdj/empInfo/send/page`, {
    method: 'POST',
    body: params,
  });
}

// 详情 查询大库
export async function getAccoName(params) {
  return request(`/osApi/annualAdj/getAccoNameByAccoId/list`, {
    method: 'POST',
    body: params,
  });
}

export async function bigAssList(params) {
  return request(`/osApi/annualAdj/adjAccoInfo/areaMaxAss`, {
    method: 'POST',
    body: params,
  });
}
export async function selectbigAssList(params) {
  return request(`/osApi/annualAdj/adjAccoInfo/maxAss`, {
    method: 'POST',
    body: params,
  });
}

// xibot
export async function getList(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/page', {
    method: 'POST',
    body: params,
  });
}

// 自主
export async function getListIndependence(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/independentSupp/page', {
    method: 'POST',
    body: params,
  });
}

// 接单
export async function getListOrders(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/suppInfo/receive/page', {
    method: 'POST',
    body: params,
  });
}

// 发单
export async function getListBilling(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/suppInfo/send/page', {
    method: 'POST',
    body: params,
  });
}

// 提交运行接单
export async function submitRev(params) {
  return request('/osApi/annualAdj/supp/updateSubmitOs', {
    method: 'POST',
    body: params,
  });
}

// 确认采集
export async function confirmCollection(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/supp/send/updateCollectState', {
    method: 'POST',
    body: params,
  });
}

// 刷新进度
export async function refreshProgress(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/getStateByYearAdjId', {
    method: 'POST',
    body: params,
  });
}

export async function delCollection(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/delete', {
    method: 'POST',
    body: params,
  });
}

export async function startFiling(params) {
  return request('/osApi/annualAdj/declareStateByOs/update', {
    method: 'POST',
    body: params,
  });
}

export async function getCusCount(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/custInfo/get', {
    method: 'POST',
    body: params,
  });
}

export async function getDetail(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/get', {
    method: 'POST',
    body: params,
  });
}

export async function fetchImportDeclList(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/adjAccoInfo/list', {
    method: 'POST',
    body: params,
  });
}

export async function fetchDictionaries(params) {
  return request(`/nsApi/mdm/nmDict/queryDictItemsByCodes`, {
    method: 'POST',
    body: params,
  });
}

export async function updateInfoProgress(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/empInfo/update', {
    method: 'POST',
    body: params,
  });
}

// 获得进度条
export async function getProgress(params) {
  return request('/osApi/annualAdj/annualAdjMainTsk/getProgress', {
    method: 'POST',
    body: params,
  });
}

// 获得进度条
export async function queryParamByArea(params) {
  return request('/osApi/operParam/queryParamByArea', {
    method: 'POST',
    body: params,
  });
}

// 工资修改
export async function getUpdateTsk(params) {
  return request('/osApi/annualAdj/empAssWageByOs/update', {
    method: 'POST',
    body: params,
  });
}
